<!-- <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box, .box1 {
      height: 200px;
      position: relative;
      margin-bottom: 10px;
    }
    .left {
      width: 200px;
      height: 100%;
      background: red;
    }
    .center {
      height: 100%;
      background: blue;
    }
    .right {
      width: 200px;
      height: 100%;
      background: greenyellow;
    }

    /* 定位 */
    .box .left {
      position: absolute;
    }
    .box .center {
      margin-left: 200px;
      margin-right: 200px;
    }
    .box .right {
      position: absolute;
      right: 0;
      top: 0;
    }

    /* 浮动 */
    .box1 .left {
      float: left;
      /* margin-left: -200px; */
    }
    .box1 .center {
      float: left;
      width: 100%;
      margin: 0 200px;
    }
    .box1 .right {
      float: left;
    }
  </style>
</head>
<body>
  <div class="box">
    <div class="left"></div>
    <div class="center"></div>
    <div class="right"></div>
  </div>
  <div class="box1">
    <div class="left"></div>
    <div class="center"></div>
    <div class="right"></div>
  </div>
</body>
</html> -->

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .layout {
      margin-top: 10px;
    }
 
    article div {
      height: 100px;
    }
    .layout.float .left {
      float: left;
      width: 300px;
      background: red;
    }

    .layout.float .center {
      background: #0fff;
    }

    .layout.float .right {
      float: right;
      width: 300px;
      background: yellow;
    }
  </style>
</head>
<body>
    
    <article class='layout float'>
      <div class="left"></div>
      <div class="right"></div>
      <div class="center">z这个是一个三部分左-中-右的布局根据float设置 第三方哈咖啡这里是最近刚好中间内容</div>
    </article>
</body>
</html>